{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# C++的打印"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1. 打印"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "① cout << \"XXXX\" << endl; 会使得屏幕打印双引号里面的字符串。\n",
    "\n",
    "② system(\"pause\"); 会使得屏幕的打印界面暂停到该语句这里，按任意键后才会继续运行。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "//下面11行代码的含义就是在屏幕中输出一个 Hello World\n",
    "\n",
    "#include<iostream>\n",
    "using namespace std;\n",
    "\n",
    "int main() {\n",
    "\n",
    "    cout << \"hello C++\" << endl;  //屏幕显示“hello C++”\n",
    "    system(\"pause\");              //按任意键继续，退出程序\n",
    "\n",
    "    return 0;\n",
    "\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "运行结果：  \n",
    " - hello C++\n",
    " - 请按任意键继续. . ."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.6.3",
   "language": "python",
   "name": "python3.6.3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
